package cn.stylefeng.guns.modular.yingbao.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.yingbao.entity.SysUser;
import cn.stylefeng.guns.modular.yingbao.model.params.SysUserParam;
import cn.stylefeng.guns.modular.yingbao.model.result.SysUserResult;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 盈宝用户表 服务类
 * </p>
 *
 * @author zs
 * @since 2019-12-10
 */
public interface SysUserService extends IService<SysUser> {

    /**
     * 新增
     *
     * @author zs
     * @Date 2019-12-10
     */
    void add(SysUserParam param);

    /**
     * 删除
     *
     * @author zs
     * @Date 2019-12-10
     */
    void delete(SysUserParam param);

    /**
     * 更新
     *
     * @author zs
     * @Date 2019-12-10
     */
    void update(SysUserParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author zs
     * @Date 2019-12-10
     */
    SysUserResult findBySpec(SysUserParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author zs
     * @Date 2019-12-10
     */
    List<SysUserResult> findListBySpec(SysUserParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author zs
     * @Date 2019-12-10
     */
     LayuiPageInfo findPageBySpec(SysUserParam param);

    ResponseData addLogin(SysUser user);

    ResponseData queryByNameAndPassword(String name, String password);

    ResponseData forgetPassword(String account, String phone, String code, String password);

    ResponseData queryByNameAndPhoneSeekMoneyPassword(String account, String phone);

    ResponseData upMoneyPassword(String account, String phone, String code, String moneyPassword, String newMoneyPassword);

    ResponseData queryByPhone(String phone);

    ResponseData queryById(long l);

    ResponseData queryByMoneyPassword(Long id, String moneyPassword);
}
